<!-- filepath: src/components/MIITBeian.vue -->
<template>
    <div class="miit-beian">
        <a
            :href="beianUrl"
            target="_blank"
            rel="noopener noreferrer"
            class="beian-link"
        >
            {{ beianText }}
        </a>
    </div>
</template>

<script setup>
import { computed } from "vue";

const props = defineProps({
    beianText: {
        type: String,
        default: "粤ICP备xxxxxxx号",
    },
    showIcon: {
        type: Boolean,
        default: true,
    },
});

const beianUrl = computed(() => "https://beian.miit.gov.cn/");
</script>

<style scoped>
.miit-beian {
    position: absolute;
    bottom: 0.1rem;
    left: 0.1rem;
    text-align: center;
    font-size: 1rem;
    color: #888;
}
.beian-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.beian-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: middle;
}
</style>